﻿using AutoMapper;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using Zocono.Infrastructure.Common;
using Zocono.WCS.Domain.PlanarProcessServiceMapDomain;
using Zocono.WCS.Infrastructure.ApllicationDto.DtoWcsManage;

namespace Zocono.WCS.Application.AppConfigureManage
{
    public class PlanarProcessServiceMapApp
    {
        private readonly IMapper _Mapper;
        private readonly IPlanarProcessServiceMapService _PlanarProcessServiceMapservice;

        public PlanarProcessServiceMapApp(IMapper mapper, IPlanarProcessServiceMapService PlanarProcessServiceMapservice)
        {
            _Mapper = mapper;
            _PlanarProcessServiceMapservice = PlanarProcessServiceMapservice;
        }

        public async Task<long> AddPlanarProcessServiceMapAsync(PlanarProcessServiceMapInfoDto PlanarProcessServiceMapInfoDto)
        {
            PlanarProcessServiceMapInfoDto.ObjectIsNullOrEmpty();//数据非空验证
            return await _PlanarProcessServiceMapservice.AddPlanarProcessServiceMapAsync(PlanarProcessServiceMapInfoDto);
        }

        public async Task<bool> DeletePlanarProcessServiceMapAsync(long ID)
        {
            return await _PlanarProcessServiceMapservice.DeletePlanarProcessServiceMapAsync(ID);
        }

        public async Task<bool> UpdatePlanarProcessServiceMapAsync(PlanarProcessServiceMapInfoDto PlanarProcessServiceMapInfoDto)
        {
            PlanarProcessServiceMapInfoDto.ObjectIsNullOrEmpty();
            return await _PlanarProcessServiceMapservice.UpdatePlanarProcessServiceMapAsync(PlanarProcessServiceMapInfoDto);
        }

        public async Task<List<PlanarProcessServiceMapInfoDto>> GetPlanarProcessServiceMapAsync(QueryPlanarProcessServiceMapInfoDto queryPlanarProcessServiceMapInfoDto)
        {
            return await _PlanarProcessServiceMapservice.GetPlanarProcessServiceMapAsync(queryPlanarProcessServiceMapInfoDto);
        }

        public async Task<PlanarProcessServiceMapInfoDto> GetPlanarProcessServiceMapByIDAsync(long ID)
        {
            return await _PlanarProcessServiceMapservice.GetPlanarProcessServiceMapByIDAsync(ID);
        }
    }
}
